package br.com.winesys.geta.databinding.componentBinder;

import java.util.Date;
import br.com.winesys.geta.databinding.ComponentBinder;
import com.toedter.calendar.JDateChooser;

public final class JDateChooserBinder implements ComponentBinder<JDateChooser> {

	private static final ComponentBinder<JDateChooser> INSTANCE = new JDateChooserBinder();

	public static ComponentBinder<JDateChooser> getInstance() {
		return INSTANCE;
	}

	private JDateChooserBinder() {
	}

	@Override
	public Object read(JDateChooser component) {
		return component.getDate();
	}

	@Override
	public void write(JDateChooser component, Object value) {
		component.setDate((Date) value);
	}
}
